// In App.js in a new project

import * as React from 'react';
import { View, Text } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';


//引入组件
import LoginScreen from './pages/LoginScreen';
import MainScreen from './pages/MainScreen';
import ProductListScreen from './pages/ProductListScreen';
import DetailScreen from './pages/DetailScreen';



const Stack = createStackNavigator();

function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator >
        <Stack.Screen
          name="Login datdtadtdtat"
          component={LoginScreen}
          options={{
            title: '管理员登录 ~登录',
            headerStyle: { backgroundColor: 'white' },

            headerTitleStyle: { color: 'black' },

          }}

        />
        <Stack.Screen name="Main" component={MainScreen} />
        <Stack.Screen options={{ title: '产品列表' }} name="Product" component={ProductListScreen} />
        <Stack.Screen name="Detail" component={DetailScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

export default App;